
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel=stylesheet href='include/hoj.css' type='text/css'>
</head>
<body>
<center>
<div style="width:90%; text-align:left">
<img src="image/logo.png"/>
</div>
<table width=96%> 
	<tr align="center" class='hd' valign="top">
				<th><a href="faqs.php">F.A.Qs</a></th>
		<th><a href="./bbs.php">Web Board</a></th>
		<th><a href="./">Home</a></th>
		<th><a href="./problemset.html">ProblemSet</a></th>
		<th><a href="./status.php">Status</a></th>
		<th><a href="./ranklist.php">Ranklist</a></th>
		<th><a href="./contest.php">Contest</a></th>
		<th><a href=loginpage.php>Login</a></th><th><a href=registerpage.php>Register</a></th>	</tr>
</table>
</center>
<center>
<div class="notice">
	<div>
		<B>Notice:</B>鉴于种种原因，本OJ自下周星期一（3月5号）开始不再全面开放，请各位做好善后事宜，谢谢合作。	</div>
</div>
</center>
</div>
<title>Problem 2424. -- [HAOI2010]订货 -- 衡阳八中OJ离线版-2012-02-29</title><center><h2>2424: [HAOI2010]订货</h2><span class=green>Time Limit: </span>10 Sec&nbsp;&nbsp;<span class=green>Memory Limit: </span>128 MB<br><span class=green>Submit: </span>31&nbsp;&nbsp;<span class=green>Solved: </span>19<br>[<a href='submitpage.php?id=2424'>Submit</a>][<a href='problemstatus.php?id=2424'>Status</a>][<a href='bbs.php?id=2424'>Discuss</a>]</center><h2>Description</h2><div class=content><p class="MsoNormal" style="text-indent:21.0pt"><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">某公司估计市场在第</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">i</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">个月对某产品的需求量为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">U<sub>i</sub></span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">，已知在第</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">i</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">月该产品的订货单价为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">d<sub>i</sub></span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">，上个月月底未销完的单位产品要付存贮费用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">m</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">，假定第一月月初的库存量为零，第</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">n</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">月月底的库存量也为零，问如何安排这</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">n</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">个月订购计划，才能使成本最低？每月月初订购，订购后产品立即到货，进库并供应市场，于当月被售掉则不必付存贮费。假设仓库容量为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">S</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt"> <o:p></o:p></span></b></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">&nbsp;&nbsp;<o:p></o:p></span></b></p>
<p></p></div><h2>Input</h2><div class=content><p class="MsoNormal" style="margin-left:21.0pt;mso-para-margin-left:2.0gd"><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">第</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">1</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">行：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">n, m, S (0&lt;=n&lt;=50, 0&lt;=m&lt;=10, 0&lt;=S&lt;=10000) <o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:21.0pt;mso-para-margin-left:2.0gd"><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">第</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">2</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">行：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">U<sub>1 </sub>, U<sub>2 </sub>, ... , U<sub>i </sub>, ... , U<sub>n</sub> (0&lt;=U<sub>i</sub>&lt;=10000) <o:p></o:p></span></b></p>
<p class="MsoNormal" style="mso-margin-bottom-alt:auto;margin-left:21.0pt"><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">第</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">3</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">行：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">d<sub>1 </sub>, d<sub>2 </sub>, ..., d<sub>i </sub>, ... , d<sub>n</sub> (0&lt;=d<sub>i</sub>&lt;=100)<o:p></o:p></span></b></p>
<p></p></div><h2>Output</h2><div class=content><p class="MsoNormal" style="mso-margin-bottom-alt:auto;margin-left:17.7pt;
text-indent:-17.7pt;mso-char-indent-count:-1.47"><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">只有</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt">1</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">行，一个整数，代表最低成本</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></b></p>
<p></p></div><h2>Sample Input</h2>
			<div class=content><span class=sampledata>3 1 1000<br />
2 4 8<br />
1 2 4 <br />
</span></div><h2>Sample Output</h2>
			<div class=content><span class=sampledata>34</span></div><h2>HINT</h2>
			<div class=content><p></p></div><h2>Source</h2>
			<div class=content><p><a href='problemset.html?search=Day1'>Day1</a></p></div><center>[<a href='submitpage.php?id=2424'>Submit</a>][<a href='problemstatus.php?id=2424'>Status</a>][<a href='bbs.php?id=2424'>Discuss</a>]</center>﻿<br>

<a href="./"><span class=red>HOME</span></a>
<a href="javascript:history.go(-1)"><span class=red>Back</span></a>

<hr>
<center>
	<div class="footer">
			<a href=setlang.php?lang=ko>한국어</a>&nbsp;
		<a href=setlang.php?lang=cn>中文</a>&nbsp;
		<a href=setlang.php?lang=fa>فارسی</a>&nbsp;
		<a href=setlang.php?lang=en>English</a>&nbsp;
		<a href=setlang.php?lang=th>ไทย</a>
	<br>		<div>版权所有 &copy;2008-2012 WaterPark Organization. | <script src="http://s21.cnzz.com/stat.php?id=2982771&web_id=2982771" language="JavaScript"></script>
</div>
		<div>Based on opensource project <a href="http://hustoj.googlecode.com">hustoj</a>.</div>
	</div>
</center>
</body>
</html>
